package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IMyExtensionFansFragmentModel;
import com.wgts.wgts.mvp.model.imp.MyExtensionFansFragmentModel;
import com.wgts.wgts.mvp.presenter.IMyExtensionFansFragmentpersenter;
import com.wgts.wgts.mvp.presenter.imp.MyExtensionFansFragmentpersenter;
import com.wgts.wgts.mvp.view.IMyExtensionFansFragmentView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class MyExtensionFansFragmentModule {

    private IMyExtensionFansFragmentView view;

    public MyExtensionFansFragmentModule(IMyExtensionFansFragmentView view) {
        this.view = view;
    }

    @Provides
    @FragmentScope
    public IMyExtensionFansFragmentView provideView(){
        return view;
    }

    @Provides
    @FragmentScope
    public IMyExtensionFansFragmentModel provideModel(NetService netService){
        return new MyExtensionFansFragmentModel(netService);
    }

    @Provides
    @FragmentScope
    public IMyExtensionFansFragmentpersenter providePersenter(IMyExtensionFansFragmentView view, IMyExtensionFansFragmentModel model){
        return new MyExtensionFansFragmentpersenter(view, model);
    }
}
